﻿using LinqToDB.Mapping;

namespace ggHD.Domain.BizObj
{
    [Table(Schema = "dbo", Name = "TiketsOfUsers")]
    public partial class TiketsOfUser
    {
        [Column, Nullable]
        public int? UserId { get; set; } // int
        [Column, Nullable]
        public int? RoleId { get; set; } // int
        [Column, NotNull]
        public long TicketId { get; set; } // bigint

        #region Associations

        /// <summary>
        /// FK__TiketsOfU__RoleI__540C7B00
        /// </summary>
        [Association(ThisKey = "RoleId", OtherKey = "RoleId", CanBeNull = true)]
        public UserRoles TiketsOfURoleI540C7B00 { get; set; }

        /// <summary>
        /// FK__TiketsOfU__Ticke__55009F39
        /// </summary>
        [Association(ThisKey = "TicketId", OtherKey = "Id", CanBeNull = false)]
        public TicketHeader TiketsOfUTicke55009F39 { get; set; }

        /// <summary>
        /// FK__TiketsOfU__UserI__531856C7
        /// </summary>
        [Association(ThisKey = "UserId", OtherKey = "UserId", CanBeNull = true)]
        public UserProfile TiketsOfUUserI531856C7 { get; set; }

        #endregion
    }
}